package org.cli.admin.command;

import java.util.Set;

import com.beust.jcommander.JCommander;
import com.google.inject.Inject;

public class CommandManager {

	@Inject
	private Set<ICommand> commands;

	@Inject
	private JCommander jCommander;

	public void prepare() {
		for (ICommand command : commands) {
			addCommand(jCommander, command);
		}
	}

	public void addCommand(JCommander commander, ICommand command) {

		// parser.

		commander.addCommand(command.getCommandName(), command, command.getAliases());
	}
}
